package com.hup.minicontroller.server.model;

import com.hup.minicontroller.common.bluetooth.BtConstant;
import com.hup.minicontroller.common.constant.BroadcastConstant;
import com.hup.minicontroller.common.constant.NetConstant;

import java.util.UUID;

import lombok.Data;

/**
 * App配置,可以按需求动态更新
 */
@Data
public class AppConfig {

    /**
     * app打开时自动server
     */
    private boolean autoStartLan = true;
    private boolean autoStartBluetooth = true;

    /**
     * 局域网配置
     * server端口号,可以按需动态修改
     */
    private int lanServerPort = NetConstant.LAN_SERVER_PORT;
    private int lanBroadcastPort = BroadcastConstant.PORT;
    private String broadcastIp = BroadcastConstant.IP;

    //蓝牙配置
    private String btServerName = BtConstant.SERVER_NAME;
    private UUID btUuid = BtConstant.BT_UUID;

    public boolean isAutoStartServer() {
        return autoStartLan || autoStartBluetooth;
    }
}
